﻿<%@ Page Language="C#" Culture="en-GB" UICulture="en-GB"  MasterPageFile="~/WebMaster.master" AutoEventWireup="true" CodeFile="AnnualData.aspx.cs" Inherits="AnnualData" Title="Untitled Page" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

Year : 
  <asp:DropDownList ID="cboDate" runat="server" DataTextFormatString="{0:yyyy}" onselectedindexchanged="cboDate_SelectedIndexChanged" AutoPostBack="true"
        >
    </asp:DropDownList>


<br />
    <asp:Label ID="lblMonth" runat="server" Text="Label"></asp:Label><br />
    <asp:Chart ID="chartCo2" runat="server"  Width="742px" Palette="EarthTones">
        <Legends>
            <asp:Legend Name="Legend1">
            </asp:Legend>
        </Legends>
        <Titles>
            <asp:Title Name="CO2 Emissions">
            </asp:Title>
        </Titles>
        <Series>
            <asp:Series  ChartArea="ChartArea1" Name="Electricity" ChartType="StackedColumn" 
                Legend="Legend1" XValueMember="Month" YValueMembers="ElectricityCo2">
            </asp:Series>
            <asp:Series Name="Gas" ChartType="StackedColumn" Legend="Legend1" 
                XValueMember="Month" YValueMembers="GasCo2">
            </asp:Series>
        </Series>
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1"  BorderColor="64, 64, 64, 64" BackSecondaryColor="White"
                BackColor="WhiteSmoke" ShadowColor="Transparent">
                <Area3DStyle Enable3D="True" />
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>


    
        <asp:Chart ID="chartTemp" runat="server"  Width="742px" Palette="SeaGreen">
        <Legends>
            <asp:Legend Name="Legend1">
            </asp:Legend>
        </Legends>
        <Titles>
            <asp:Title Name="Temperatures">
            </asp:Title>
        </Titles>
        <Series>
           
         <asp:Series  ChartArea="ChartArea1" Name="MinTemp" ChartType="Spline" 
                Legend="Legend1" XValueMember="Month" YValueMembers="MinTemp" 
                BorderWidth="4" Color="Blue">
            </asp:Series>
            <asp:Series  ChartArea="ChartArea1" Name="AverageTemp" ChartType="Spline" 
                Legend="Legend1" XValueMember="Month" YValueMembers="AvgTemp" 
                BorderWidth="4" Color="Yellow" YValuesPerPoint="2">
            </asp:Series>
            <asp:Series Name="MaxTemp" ChartType="Spline" Legend="Legend1" 
                XValueMember="Month" YValueMembers="MaxTemp" BorderWidth="4" 
                Color="Red" XValueType="Date" ShadowOffset="1" ShadowColor="#CCCCCC">
            </asp:Series>
        </Series>
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1"  BorderColor="64, 64, 64, 64" BackSecondaryColor="White"
                BackColor="WhiteSmoke" ShadowColor="Transparent">
                 <Area3DStyle Enable3D="false" />
                 <AxisX Minimum="1" Maximum="12"></AxisX>
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>
    
    
    
    
    
        
        <asp:Chart ID="chartDegreeDays" runat="server"  Width="742px" Palette="SeaGreen">
        <Legends>
            <asp:Legend Name="Legend1">
            </asp:Legend>
        </Legends>
        <Titles>
            <asp:Title Name="Degree Days">
            </asp:Title>
        </Titles>
        <Series>
             <asp:Series Name="DegreeDays" Legend="Legend1" 
                XValueMember="Month" YValueMembers="DegreeDays" 
                BackGradientStyle="TopBottom" >
            </asp:Series>

        </Series>
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1"  BorderColor="64, 64, 64, 64" BackSecondaryColor="White"
                BackColor="WhiteSmoke" ShadowColor="Transparent">
                 <Area3DStyle Enable3D="false" />
                 <AxisX Minimum="1" Maximum="12"></AxisX>
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>
    
    
    
    
    
    

  Data
    <asp:GridView ID="dgData" runat="server" AutoGenerateColumns="False" 
        BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" 
        CellPadding="2" ForeColor="Black" GridLines="None">
        <Columns>
            <asp:BoundField DataField="MinDate" DataFormatString="{0:Y}" HeaderText="Month" />
            <asp:BoundField DataField="ElectricityKwh" DataFormatString="{0:N1}" HeaderText="Electricity Kwh"  />
            <asp:BoundField DataField="GasKwh" DataFormatString="{0:N1}" HeaderText="Gas Kwh"  />
     
            <asp:BoundField DataField="ElectricityCo2" DataFormatString="{0:N1}" HeaderText="Electricity Co2"/>
            <asp:BoundField DataField="GasCo2" DataFormatString="{0:N1}" HeaderText="Gas CO2"  />

            <asp:BoundField DataField="Co2" DataFormatString="{0:N1}" HeaderText="Total CO2"  />
            <asp:BoundField DataField="EnergyRate" DataFormatString="{0:N3}" HeaderText="Energy Rate"  />
        </Columns>
        <FooterStyle BackColor="Tan" />
        <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" 
            HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
        <HeaderStyle BackColor="Tan" Font-Bold="True" />
        <AlternatingRowStyle BackColor="PaleGoldenrod" />
    </asp:GridView>
    
    
    <asp:ScriptManager ID="ScriptManager1" runat="server" 
        EnableScriptGlobalization="True">
    </asp:ScriptManager>

</asp:Content>

